perm filename FINAL.106[1,RWF] blob
sn#545531 filedate 1980-11-21 generic text, type C, neo UTF8
COMMENT ā VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 CS106 Nov. 21, 1980
C00004 ENDMK
Cā;
CS106 Nov. 21, 1980
Fall Quarter
FINAL PROJECT
The input file (CS:CORNER.DAT) contains a picture of the corner of
a polygon. Because of effects of reflections, shadows, etc., it is not
perfect; perhaps it looks like this:
****** * ***
***********
*** ***** *
* ******** *
**********
******* *
** ***
*
Your program should try to find the two lines that delimit the polygon. As
nearly as possible, all the asterisks should fall in one angle of the two lines,
and all the spaces outside. Output should give the equations of the lines, along
with a modified copy of the input file, with blanks inside the angle changed to
periods, and asterisks outside it changed to / . Your program need not be
mathematically perfect, but it should come close to the decision that the human
eye would.
The file begins with two integers H and W , where H is the height
of the image and W the width. The rest of the file is the image itself.